<include file="common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('members/member_amt')}">用户余额变动记录列表</a>
</div>
<div class="permissions-content">
    <div class="permissions-le">
        <div class="add-msg">
            <div class="add-form">
                <form method="get" action="" onsubmit="return false;">
                    <select class="select" id="status">
                        <option value="">变动状态</option>
                        <option value="1">加款</option>
                        <option value="2">扣款</option>
                    </select>
                    <input type="hidden" name="m" value="seller"/>
                    <input type="hidden" name="c" value="members"/>
                    <input type="hidden" name="a" value="member_amt"/>
                    <input type="hidden" id="orderby1" value="amt_id"/>
                    <input type="hidden" id="orderby2" value="DESC"/>
                    <div class="add-ipt">
                        <input placeholder="姓名" type="text" id="user" class="add-name" />
                        <button type="button" onclick="search_data();"></button>
                    </div>
                </form>
            </div>
        </div>

        <div class="permissions-table">
            <table border="0" width="100%">
                <thead>
                <tr>
                    <td>变动时间</td>
                    <td>用户</td>
                    <td>变动说明</td>
                    <td>变动金额</td>
                    <td>可用余额</td>
                </tr>
                </thead>
                <tbody class="trade-setting" id="ajax_return"></tbody>
            </table>
        </div>
    </div>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function(){
        // ajax 加载商品列表
        ajax_get_table(1);
    });

    // ajax 抓取页面 form 为表单id  page 为当前第几页
    function ajax_get_table(page){
        cur_page = page; //当前页面 保存为全局变量
        $.ajax({
            type : "POST",
            url:"{:U('Members/ajax_change_list')}",
            data : {
                p :page,
                user :$("#user").val(),
                status :$("#status").val(),
                orderby1 :$("#orderby1").val(),
                orderby2 :$("#orderby2").val()
            },
            success: function(data){
                $("#ajax_return").html('');
                $("#ajax_return").append(data);
            }
        });
    }
</script>

<include file="common:__foot__"/>